module Alarm(clk,clk_500Hz,minute,second,beep);
 
input [5:0]minute,second;
input clk_500Hz,clk;
//input alarm;  
output reg beep;
always@(clk)
	begin
		// if(alarm)
		// 	begin
		// 		beep <= clk_500Hz;
		// 	end
		if(minute == 'd59)
			begin
				if( second == 'd54 || second == 'd56|| second == 'd58||second == 'd59 )//可能变8'h59
					beep <= clk_500Hz;
				// else if(second == 'd59)
				// 	beep <= clk_1KHz;
				else
					beep <= 'd0;
			end
		else
			begin
				beep <= 'd0;
			end
	end
	
endmodule
